package mapReader;



import information.Kaart;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.List;

import util.Coordinaat;


public class KaartLezer {

	public Kaart lees(String file) throws IOException
	{
		GhostInformatie gi = new GhostInformatie("speler");
		
		GhostProtocol gp = new GhostProtocol(gi, 4);
		
		File f = new File(file);
		BufferedReader reader = new BufferedReader(new FileReader(f));
		
		String commando;
		while((commando = reader.readLine()) != null)
		{
			gp.verwerkInkomend(commando + "\n");
		}
		
		return gi.getSpelerManager().getAndereSpelers().get(0).getKaart();
	}
}
